package com.zhaotianhao.springboot_demo_fire.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author Z-7
 * @since 2022-03-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("firearms")
@Document(indexName = "fire",type = "t_fire")
public class Firearms implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 枪械id
     */
    @Id
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 名称
     */
    private String name;

    /**
     * 容量
     */
    private Integer capacity;

    /**
     * 类型
     */
    private Integer typeId;

    /**
     * 类型名称
     */
    @TableField(exist = false)
    private String typeName;

    /**
     * 子弹型号
     */
    private Double model;

    /**
     * 发布日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date publishDate;

    /**
     * 皮肤
     */
    private String skin;

    /**
     * 配件
     */
    @TableField(exist = false)
    private List<Parts> parts;

    /**
     * uuid
     */
    @TableField(exist = false)
    private String uuid;

    /**
     * 配件名称
     */
    @TableField(exist = false)
    private String partsName;
}
